/*
 * @Author: luojianfeng
 * @Date: 2022-12-14 11:07:13
 * @LastEditTime: 2022-12-14 11:24:05
 * @LastEditors: luojianfeng
 * @Description:
 */
import { createPinia } from 'pinia'
import { type PluginModule } from '~/types/plugins'
import piniaPluginPersist from 'pinia-plugin-persist'

// Setup Pinia
// https://pinia.vuejs.org/
export const install = ({ isClient, app }: PluginModule) => {
  const pinia = createPinia()
  pinia.use(piniaPluginPersist)
  app.use(pinia)
  if (isClient) pinia.state.value = {}
}
